package com.ourteam.product.requirement.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 CST 2017
 * Auto Generate Date : 2018-05-03 16:46:01
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductIssueAttachBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.Id);

        mappedDaoFields.put("issueId",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.IssueId);

        mappedDaoFields.put("attachFileName",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.AttachFileName);

        mappedDaoFields.put("attachFilePath",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.AttachFilePath);

        mappedDaoFields.put("uploadTime",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.UploadTime);

        mappedDaoFields.put("uploadUserId",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.UploadUserId);

        mappedDaoFields.put("status",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.Remarks);

        mappedDaoFields.put("uploadUserName",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.UploadUserName);

        mappedDaoFields.put("uploadUserPhoto",
            com.ourteam.product.requirement.dao.IProductIssueAttachDAO.UploadUserPhoto);
    }

    private com.ourteam.product.requirement.dao.ProductIssueAttach productIssueAttach;

    public ProductIssueAttachBean() {
        super();

        this.productIssueAttach = new com.ourteam.product.requirement.dao.ProductIssueAttach();
    }

    public ProductIssueAttachBean(
        com.ourteam.product.requirement.dao.ProductIssueAttach productIssueAttach) {
        super();

        this.productIssueAttach = productIssueAttach;
    }

    public BeanMap getBeanMap() {
        return new BeanMap(productIssueAttach);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.requirement.dao.ProductIssueAttach convertToProductIssueAttach() {
        return this.productIssueAttach;
    }

    public com.ourteam.product.requirement.dao.ProductIssueAttach convertTo() {
        return this.productIssueAttach;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productIssueAttach.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productIssueAttach.setId(id);
    }

    /**
     * Get issueId
     *
     * @return long
     */
    public long getIssueId() {
        return (long) this.productIssueAttach.getIssueId();
    }

    /**
     * Set issueId
     *
     * @parameter long
     */
    public void setIssueId(long issueId) {
        this.productIssueAttach.setIssueId(issueId);
    }

    /**
     * Get attachFileName
     *
     * @return String
     */
    public String getAttachFileName() {
        return (String) this.productIssueAttach.getAttachFileName();
    }

    /**
     * Set attachFileName
     *
     * @parameter String
     */
    public void setAttachFileName(String attachFileName) {
        this.productIssueAttach.setAttachFileName(attachFileName);
    }

    /**
     * Get attachFilePath
     *
     * @return String
     */
    public String getAttachFilePath() {
        return (String) this.productIssueAttach.getAttachFilePath();
    }

    /**
     * Set attachFilePath
     *
     * @parameter String
     */
    public void setAttachFilePath(String attachFilePath) {
        this.productIssueAttach.setAttachFilePath(attachFilePath);
    }

    /**
     * Get uploadTime
     *
     * @return java.util.Date
     */
    public java.util.Date getUploadTime() {
        return (java.util.Date) this.productIssueAttach.getUploadTime();
    }

    /**
     * Set uploadTime
     *
     * @parameter java.util.Date
     */
    public void setUploadTime(java.util.Date uploadTime) {
        this.productIssueAttach.setUploadTime(uploadTime);
    }

    /**
     * Get uploadUserId
     *
     * @return long
     */
    public long getUploadUserId() {
        return (long) this.productIssueAttach.getUploadUserId();
    }

    /**
     * Set uploadUserId
     *
     * @parameter long
     */
    public void setUploadUserId(long uploadUserId) {
        this.productIssueAttach.setUploadUserId(uploadUserId);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productIssueAttach.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productIssueAttach.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productIssueAttach.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productIssueAttach.setRemarks(remarks);
    }

    /**
     * Get uploadUserName
     *
     * @return String
     */
    public String getUploadUserName() {
        return (String) this.productIssueAttach.getUploadUserName();
    }

    /**
     * Get uploadUserPhoto
     *
     * @return String
     */
    public String getUploadUserPhoto() {
        return (String) this.productIssueAttach.getUploadUserPhoto();
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductIssueAttachBean) == false) {
            return false;
        } // end if

        ProductIssueAttachBean other = (ProductIssueAttachBean) obj;

        boolean isEqual = false;

        com.ourteam.product.requirement.dao.ProductIssueAttach tempProductIssueAttach =
            other.convertToProductIssueAttach();

        if ((tempProductIssueAttach == null) ||
                (this.productIssueAttach == null)) {
            isEqual = false;
        } else if ((tempProductIssueAttach == this.productIssueAttach) ||
                tempProductIssueAttach.equals(this.productIssueAttach)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductIssueAttachBean[] toArray(
        com.ourteam.product.requirement.dao.ProductIssueAttach[] aProductIssueAttachs) {
        return toArray(aProductIssueAttachs, null);
    }

    public static ProductIssueAttachBean[] toArray(
        com.ourteam.product.requirement.dao.ProductIssueAttach[] aProductIssueAttachs,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductIssueAttachs)) {
            return new ProductIssueAttachBean[0];
        }

        int length = aProductIssueAttachs.length;

        ProductIssueAttachBean[] beans = new ProductIssueAttachBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductIssueAttachBean(aProductIssueAttachs[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductIssueAttachs[i] });
            }
        }

        return beans;
    }
}
